package zj.it.bhne.gridengineeringsurvey.myutils.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import zj.it.bhne.gridengineeringsurvey.entity.greendao.Equipment;
import zj.it.bhne.gridengineeringsurvey.entity.greendao.Points;
import zj.it.bhne.gridengineeringsurvey.entity.greendao.Photos;
import zj.it.bhne.gridengineeringsurvey.entity.greendao.Online;
import zj.it.bhne.gridengineeringsurvey.entity.greendao.Items;
import zj.it.bhne.gridengineeringsurvey.entity.greendao.Line;

import zj.it.bhne.gridengineeringsurvey.myutils.greendao.EquipmentDao;
import zj.it.bhne.gridengineeringsurvey.myutils.greendao.PointsDao;
import zj.it.bhne.gridengineeringsurvey.myutils.greendao.PhotosDao;
import zj.it.bhne.gridengineeringsurvey.myutils.greendao.OnlineDao;
import zj.it.bhne.gridengineeringsurvey.myutils.greendao.ItemsDao;
import zj.it.bhne.gridengineeringsurvey.myutils.greendao.LineDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig equipmentDaoConfig;
    private final DaoConfig pointsDaoConfig;
    private final DaoConfig photosDaoConfig;
    private final DaoConfig onlineDaoConfig;
    private final DaoConfig itemsDaoConfig;
    private final DaoConfig lineDaoConfig;

    private final EquipmentDao equipmentDao;
    private final PointsDao pointsDao;
    private final PhotosDao photosDao;
    private final OnlineDao onlineDao;
    private final ItemsDao itemsDao;
    private final LineDao lineDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        equipmentDaoConfig = daoConfigMap.get(EquipmentDao.class).clone();
        equipmentDaoConfig.initIdentityScope(type);

        pointsDaoConfig = daoConfigMap.get(PointsDao.class).clone();
        pointsDaoConfig.initIdentityScope(type);

        photosDaoConfig = daoConfigMap.get(PhotosDao.class).clone();
        photosDaoConfig.initIdentityScope(type);

        onlineDaoConfig = daoConfigMap.get(OnlineDao.class).clone();
        onlineDaoConfig.initIdentityScope(type);

        itemsDaoConfig = daoConfigMap.get(ItemsDao.class).clone();
        itemsDaoConfig.initIdentityScope(type);

        lineDaoConfig = daoConfigMap.get(LineDao.class).clone();
        lineDaoConfig.initIdentityScope(type);

        equipmentDao = new EquipmentDao(equipmentDaoConfig, this);
        pointsDao = new PointsDao(pointsDaoConfig, this);
        photosDao = new PhotosDao(photosDaoConfig, this);
        onlineDao = new OnlineDao(onlineDaoConfig, this);
        itemsDao = new ItemsDao(itemsDaoConfig, this);
        lineDao = new LineDao(lineDaoConfig, this);

        registerDao(Equipment.class, equipmentDao);
        registerDao(Points.class, pointsDao);
        registerDao(Photos.class, photosDao);
        registerDao(Online.class, onlineDao);
        registerDao(Items.class, itemsDao);
        registerDao(Line.class, lineDao);
    }
    
    public void clear() {
        equipmentDaoConfig.clearIdentityScope();
        pointsDaoConfig.clearIdentityScope();
        photosDaoConfig.clearIdentityScope();
        onlineDaoConfig.clearIdentityScope();
        itemsDaoConfig.clearIdentityScope();
        lineDaoConfig.clearIdentityScope();
    }

    public EquipmentDao getEquipmentDao() {
        return equipmentDao;
    }

    public PointsDao getPointsDao() {
        return pointsDao;
    }

    public PhotosDao getPhotosDao() {
        return photosDao;
    }

    public OnlineDao getOnlineDao() {
        return onlineDao;
    }

    public ItemsDao getItemsDao() {
        return itemsDao;
    }

    public LineDao getLineDao() {
        return lineDao;
    }

}
